#include <stdio.h>

int getmax(int n, int t[ ]);

int main(void)
{
	int s1[3] = {6, 3, 9}, s2[5] = {1, 3, 6, 8, 5};
	
	printf("The max value in the array s1 is %d.\n", getmax(3, s1));
	printf("The max value in the array s2 is %d.\n", getmax(5, s2));
	
	return 0;
}

int getmax(int n, int t[ ])
{
	int i, max;

	max = t[0];
	for (i = 1; i < n; i++)
		if (t[i] > max)
			max = t[i];

	return max;
}